package com.ruoyi.surveillance.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.surveillance.domain.TCompanyInfo;
import com.ruoyi.surveillance.mapper.TAirportInfoMapper;
import com.ruoyi.surveillance.mapper.TCompanyInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 空域类型Controller
 *
 * @author SUNLIANG
 * @date 2023/11/1
 */
@RestController
@RequestMapping("/data")
public class DataStatisticsController extends BaseController {

    @Autowired
    private TCompanyInfoMapper tCompanyInfoMapper;

    @Autowired
    private TAirportInfoMapper tAirportInfoMapper;

    /**
     * 查询企业数据
     */

    @GetMapping("/company")
    public AjaxResult companyList() {
        return AjaxResult.success(tCompanyInfoMapper.selectList(null));
    }

    /**
     * 查询通用机场数据
     */

    @GetMapping("/airport")
    public AjaxResult airportList() {
        return AjaxResult.success(tAirportInfoMapper.selectList(null));
    }


}
